/**
 * fulihui.com Inc.
 * Copyright (c) 2015-2016 All Rights Reserved.
 */
package com.fulihui.integral.core.enums;

import com.google.common.collect.Lists;
import org.near.toolkit.model.BaseEnum;

import java.util.List;

/**
 * 积分渠道
 *
 * @author yunfeng.li
 * @version $Id: v 0.1 2017年04月13日 10:28 yunfeng.li Exp $
 */
public enum ISChannelType implements BaseEnum {

    //新用户

    NEW_REGISTER(0, "NEW_REGISTER", "新用户注册"),

    FIRST_COMMENT(0, "FIRST_COMMENT", "首次评论"),

    FIRST_SHARE(0, "FIRST_SHARE", "首次分享"),

    //常规

    DRAW(1, "DRAW", "抽奖"),

    READ_RED(1, "READ_RED", "阅读红包"),

    COMMENT(1, "COMMENT", "用户评论"),

    SHARE(1, "SHARE", "文章分享"),

    INVITE(1, "INVITE", "邀请好友"),

    FEEDBACK(1, "FEEDBACK", "有益反馈"),

    UPDATE_VERSION(1, "UPDATE_VERSION", "APP版本更新"),

    JIFEN_CONVERT(1, "JIFEN_CONVERT", "积分兑换金额"),

    JIFEN_CONVERT_DRAW(1, "JIFEN_CONVERT_DRAW", "积分兑换抽奖次数"),

    JIFEN_CONVERT_GOODS(1, "JIFEN_CONVERT_GOODS", "积分兑换商品"),

    JIFEN_VALID(1, "JIFEN_VALID", "积分有效期"),

    SIGN_IN(1, "SIGN_IN", "每日签到"),

    REGISTER_CASH(1, "REGISTER_CASH", "注册送钱"),

    GAME(2,"GAME", "通用积分"),
    REPORT(2,"REPORT", "兑吧积分"),
    SIGN(2,"SIGN","弹层签到"),
    RESIGNADDCREDITS(2,"RESIGNADDCREDITS","补签到"),
    CREDITSGAME(2,"CREDITSGAME","积分游戏"),
    ALIPAY(2,"ALIPAY","支付宝"),
    QB(2,"QB","Q币"),
    COUPON(2,"COUPON","优惠券"),
    OBJECT(2,"OBJECT","实物"),
    PHONEBILL(2,"PHONEBILL","话费"),
    PHONEFLOW(2,"PHONEFLOW","流量"),
    VIRTUAL(2,"VIRTUAL","虚拟商品"),
    LITTLEGAME(2,"LITTLEGAME","小游戏"),
    SINGLELOTTERY(2,"SINGLELOTTERY","单品抽奖"),
    HDTOOLLOTTERY(2,"HDTOOLLOTTERY","活动抽奖"),
    HTOOL(2,"HTOOL","新活动抽奖"),
    MANUALLOTTERY(2,"MANUALLOTTERY","手动开奖"),
    NGAMELOTTERY(2,"NGAMELOTTERY","新游戏"),
    QUESTIONLOTTERY(2,"QUESTIONLOTTERY","答题"),
    QUIZZLOTTERY(2,"QUIZZLOTTERY","测试题"),
    GUESSLOTTERY(2,"GUESSLOTTERY","竞猜"),
    REFUND(2,"REFUND","退款");

    /**
     * 类型，0为新用户专有，1为常规 , 2 兑吧
     */
    private int type;

    private String code;

    private String desc;

    ISChannelType(int type, String code, String desc) {
        this.type = type;
        this.code = code;
        this.desc = desc;
    }

    /**
     * 获取所有渠道code
     *
     * @return
     */
    public static List<String> getCodes() {
        List<String> codes = Lists.newArrayList();
        ISChannelType[] values = ISChannelType.values();
        for (ISChannelType value : values) {
            codes.add(value.getCode());
        }
        return codes;
    }

    /**
     * 获取枚举代码
     */
    @Override
    public String getCode() {
        return code;
    }

    /**
     * 获取枚举描述
     */
    @Override
    public String getDesc() {
        return desc;
    }

    /**
     * Getter method for property <tt>type</tt>
     *
     * @return property value of type
     */
    public int getType() {
        return type;
    }
}
